package dreampack.dataType;

import java.sql.*;

public class SubjectType {
	private int subjectId;
	private String subectName;
	
	public SubjectType(){}
	
	public boolean init(ResultSet rs) throws Exception{
		boolean bRet = true;
		try{
			this.subjectId = (int)rs.getInt("id");
			this.subectName = (String)rs.getString("name");
		}catch(Exception e){
			bRet = false;
		}
		return bRet;
	}
	public int getId(){
		return this.subjectId;
	}
	public String getName(){
		return this.subectName;
	}
}
